/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package models;

import javax.persistence.Entity;
import play.db.jpa.Model;

/**
 *
 * @author Administrador
 */
@Entity
public class Alumno extends Model{
    
    public String codigo;
    public String password;
    public String nombres;
    public String apellidos;
    public String eap;
    
    public Alumno(String codigo,String password,String nombres,String apellidos,String eap ){
        this.codigo=codigo;
        this.password=password;
        this.nombres=nombres;
        this.apellidos=apellidos;
        this.eap=eap;
    }
    
    public static Alumno connect(String codigo, String password) {
    return find("byCodigoAndPassword", codigo, password).first();
    }
    
    public static Alumno connect(String codigo) {
    return find("byCodigo",codigo).first();
}
    
}
